from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop020"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox,"商品管理",'商品属性','属性')
firefox.find_element_by_link_text('删除').click()
firefox.switch_to.alert.accept()
s=firefox.find_element_by_xpath('//body').text
# print(s)
l='天天'
r='\)'
num=reGetString(s,l,r)
print(num)
if num=='没有匹配到需要的内容,请检查左右边界内容':
    writeLog("%s 测试通过" % testCase)
else:
    writeLog("%s 测试不通过" % testCase)
    getPhoto(firefox)
firefox.quit()
